home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / Container / Sources / Views.fr < prev   
Encoding:
Text File  |  1996-04-25  |  3.3 KB  |  109 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Views.fr
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Contains:            Common (Platform independent) resources for the Container part
  7. //
  8. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef FWRESFIL_K
  13. #include "FWResFil.k"
  14. #endif
  15.  
  16. #ifndef FWVIEWS_FR
  17. #include "FWViews.fr"
  18. #endif
  19.  
  20. #ifndef FWNOTDEF_H
  21. #include "FWNotDef.h"     
  22. #endif
  23.  
  24. #ifndef DEFINES_K
  25. #include "Defines.k"
  26. #endif
  27.  
  28. //========================================================================================
  29. // type RContainerView
  30. //========================================================================================
  31. // RContainerView doesn't add any field to FW_RSuperView
  32. // IMPORTANT: the resource label below must match LContainerView declared in the .cpp file 
  33.  
  34. type RContainerView : FW_RSuperView(Label='ctvw')
  35. {
  36. };
  37.  
  38. //========================================================================================
  39. // resource RDrawFrame(kDrawView)
  40. //========================================================================================
  41. // See constants in "FWViews.k", macros & resource types in "FWViews.fr"
  42.  
  43. // Reference size for the Draw frame (will be adjusted at runtime)
  44. #define H     FW_FIX(1000)
  45. #define H1     H + FW_FIX(1)
  46.  
  47. // Drawing extent (constants defined in Defines.k to be used also in .cpp files)
  48. #define X    FW_FIX(kDrawingSizeX)
  49. #define Y    FW_FIX(kDrawingSizeY)
  50.  
  51. resource FW_RFrameLayout(kContainerView)
  52. {
  53.     {H,H},                    // LayoutSize
  54.     {                        // Start list of frame's subviews
  55.         RContainerView
  56.         (
  57.             kContainerViewID,                    // View id
  58.             {0, 0, H-FW_SBSIZE, H-FW_SBSIZE},    // Bounds
  59.             FW_kFitToEnclosure,                    // bindings
  60.             {X,Y},                                // extent
  61.             1,                                    // Make it the ContentView
  62.             FW_kXYScrolling,                    // scrolling in both directions
  63.             {}                                    // no SubViews
  64.         ),
  65.         FW_RScrollBar            // Horizontal SB
  66.         (
  67.             kHorzScrollBarID,                    // View id
  68.             {-FW_ONE, H-FW_SBSIZE, H1-FW_SBSIZE, H1},// Bounds
  69.             FW_kHScrollBarBinding,                // Standard horizontal SB bindings
  70.             0,                                    // control message
  71.             0,                                    // control receiver
  72.             0,                                    // control value
  73.             0,                                    // SB Min Value (adjusted at runtime)
  74.             1,                                    // SB Max Value (adjusted at runtime)
  75.             FW_ONE,                                // SB Minor Units (adjusted at runtime)
  76.             FW_ONE                                // SB Major Units (adjusted at runtime)
  77.         ),
  78.         FW_RScrollBar            // Vertical SB
  79.         (
  80.             kVertScrollBarID,                    // View id
  81.             {H-FW_SBSIZE,-FW_ONE, H1, H1-FW_SBSIZE},// Bounds
  82.             FW_kVScrollBarBinding,                // Standard vertical SB binding
  83.             0,                                    // control message
  84.             0,                                    // control receiver
  85.             0,                                    // control value
  86.             0,                                    // SB Min Value (adjusted at runtime)
  87.             1,                                    // SB Max Value (adjusted at runtime)
  88.             FW_ONE,                                // SB Minor Units (adjusted at runtime)
  89.             FW_ONE                                // SB Major Units (adjusted at runtime)
  90.         ),
  91.         FW_RGrowBox
  92.         (
  93.             kGrowBoxID,                            // View id
  94.             {H - FW_SBSIZE, H - FW_SBSIZE, H1, H1},    // Bounds
  95.             FW_kGrowBoxBinding                    // standard grow box binding
  96.         )
  97.     },
  98.     {                            // Scroller
  99.         FW_RScrollBarScroller
  100.         (
  101.             FW_FIX(15),                            // AutoScrollInset
  102.             {FW_FIX(20), FW_FIX(20)}            // AutoScrollIncrement
  103.             kHorzScrollBarID,                    // horiz sb id
  104.             kVertScrollBarID                    // vertical sb id
  105.         )
  106.     }
  107. };
  108.  
  109.